import request from '@/utils/request'

export default {
  homeTotalData(){
    return request({
      url:'/home/total',
      method:'get'
    })
  },
  homeSummary(params){
    return request({
      url:'/home/summary',
      method:'get',
      params
    })
  },
  summaryDetail(params){
    return request({
      url:'/home/summary-detail',
      method:'get',
      params
    })
  },
  homeChartData(){
    return request({
      url:'/home/chart',
      method:'get'
    })
  },
  approvalQuery(tableQuery, tablePage){
    let params={
      page:tablePage.current?tablePage.current:1,
      num:tablePage.size?tablePage.size:20,
      msg:tableQuery.msg,
      status:tableQuery.status
    }
    return request({
      url:'/notice/approval',
      method:'get',
      params
    })
  },
  approvalStore(data){
    return request({
      url:'/approval/store',
      method:'post',
      data
    })
  },
  approvalMutilStore(data){
    return request({
      url:'/approval/store-multi',
      method:'post',
      data
    })
  },
  approvalDelete(id){
    return request({
      url:`/approval/${id}`,
      method:'delete'
    })
  },
  approvalNotify(){
    return request({
      url:'/notice/notify',
      method:'get'
    })
  }
}
